﻿<local:DocumentBase x:Class="WPFExcelReport.EKLS"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"
                xmlns:fd="clr-namespace:Labs.Filtering;assembly=ReflectionStudio.Core"
        xmlns:wep="clr-namespace:WPFExcelReport"
       Height="700" Width="1024" 
          
        Title="浆纱工艺表"  
     >
    <Grid DataContext="" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
        <Grid.RowDefinitions>
            <RowDefinition Height="40"></RowDefinition>
            <RowDefinition Height="80"></RowDefinition>
            <RowDefinition Height="Auto"></RowDefinition>
        </Grid.RowDefinitions>
        <WrapPanel Grid.Row="0">
            <Button Content="查询" Height="25" HorizontalAlignment="Left" Margin="11,17,0,0" Name="btnQuery"
                        Click ="btnQuery_Click" VerticalAlignment="Top" Width="106" />
            <Button Content="产生报表" Height="25" HorizontalAlignment="Left" Margin="11,17,0,0" Name="btnReport"
                        Click ="btnReport_Click" VerticalAlignment="Top" Width="106" />
        </WrapPanel>
        <GroupBox Grid.Row="1"
            Header="供应商采购统计" HorizontalAlignment="Stretch" Margin="10,5,5,10" Name="groupBox2" VerticalAlignment="Stretch"
                  Background="Goldenrod"
                  >
            <Grid Height="43">
                <Label Content="下单时间从" Height="26" HorizontalAlignment="Left" Margin="13,11,0,0" Name="label6" VerticalAlignment="Top" Width="70" />
                <Label Content="至" Height="28" HorizontalAlignment="Left" Margin="183,11,0,0" Name="label7" VerticalAlignment="Top" Width="29" />
                <DatePicker HorizontalAlignment="Left" Margin="2,44,0,0" Name="datePicker1" VerticalAlignment="Top" />
                <DatePicker Height="25" HorizontalAlignment="Left" Margin="86,9,0,0" Name="OpenOrderDate1" VerticalAlignment="Top" Width="95"
                                SelectedDateChanged="OpenOrderDate1_SelectedDateChanged"/>
                <DatePicker Height="25" HorizontalAlignment="Right" Margin="0,9,718,0" Name="OpenOrderDate2" VerticalAlignment="Top" Width="95" 
                                SelectedDateChanged="OpenOrderDate2_SelectedDateChanged"/>
            </Grid>
        </GroupBox>
        <fd:FilteringDataGrid Grid.Row="2"
            AutoGenerateColumns="False" EnableRowVirtualization="True"  
                                             ItemsSource="{Binding Path=PURCHASE_SUPP_SUMM}"
                                              x:Name="MasterData" 
                                                 CanUserReorderColumns="True"  
                                             CanUserResizeRows="True"
                                              CanUserSortColumns="True"
                                              IsFilteringCaseSensitive="False" 
                                              RowDetailsVisibilityMode="VisibleWhenSelected"   
                                              Width="1000"
                                              Height="600"
                                              EnableColumnVirtualization="True"  
                                              ScrollViewer.HorizontalScrollBarVisibility="Auto"
                                              ScrollViewer.VerticalScrollBarVisibility="Auto"
                                              SelectionChanged="ItemsControls_SelectionChanged"
                                              >
            <DataGrid.Columns>
                <!--ABPAUFKRS;ABPAUFLFD;ABPAUFPOS;ABPART;ABPVAR;FACTORY;COLOR;ABPFARBE;QUANTITY;ABPSTARTDAT;ABPENDDAT;ACTENDDATE;-->
                <!--供应商编号	供应商名称	总数量	总金额-->
                <DataGridTextColumn Binding="{Binding Path=LIEFNR}" Header="供应商编号" Width="SizeToCells" MinWidth="120" />
                <DataGridTextColumn Binding="{Binding Path=SUPPLIER}" Header="供应商名称" Width="SizeToCells" MinWidth="120" />
                <DataGridTextColumn Binding="{Binding Path=QUANTITY}" Header="总数量" Width="SizeToCells" MinWidth="80" />
                <DataGridTextColumn Binding="{Binding Path=VALUE}" Header="总金额" Width="SizeToCells" MinWidth="80" />
            </DataGrid.Columns>
        </fd:FilteringDataGrid>
    </Grid>
</local:DocumentBase >

